/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren;

import io.renren.servlet.ResponseDemo2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;

@SpringBootApplication
//该注解会扫描相应的包
@ServletComponentScan
public class ApiApplication {
	@Bean
	public ServletRegistrationBean MyServlet1(){
		return new ServletRegistrationBean(new ResponseDemo2(),"/ResponseDemo2");
	}
	public static void main(String[] args) {
		SpringApplication.run(ApiApplication.class, args);
	}

}
